<template>
  <div>
    姓名： <input type="text" name="" id="" v-model="uname" /><br />
    密码：<input type="password" v-model="pwd" /><br />
    <button @click="submit">提交</button>
  </div>
</template>

<script>
export default {
  name: "HonorLevel",
  data() {
    return {
      uname: "",
      pwd: "",
    };
  },
  methods: {
    submit() {
      if (this.uname.trim() && this.pwd.trim()) {
        console.log(this.uname, this.pwd);
      } else {
        this.$message.error("请输入完整的账户和密码！");
      }
    },
  },
};
</script>

<style lang="less" scoped>
</style>